import { legacy_createStore as createStore, combineReducers, applyMiddleware } from 'redux'
import thunk from 'redux-thunk'
import { composeWithDevTools } from 'redux-devtools-extension'
import { allStore } from './utils/buildRouter'

const rootReducer = combineReducers({
  ...allStore
})
console.log(allStore)
const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(thunk)))
window.DISPATCH = store.dispatch
export default store
